package com.xr.blog.exception;

/**
 * 自定义异常
 * 
 * @author 幸仁杰
 */
public class CustomException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private Integer code;

    private String msg;

    public CustomException(String message)
    {
        this.msg = message;
    }

    public CustomException(String message, Integer code)
    {
        this.msg = message;
        this.code = code;
    }

    public CustomException(String message, Throwable e)
    {
        super(message, e);
        this.msg = message;
    }

    @Override
    public String getMessage()
    {
        return msg;
    }

    public Integer getCode()
    {
        return code;
    }
}
